/*
 * @Author: HZK
 * @Date: 2020-09-08 13:53:40
 * @LastEditTime: 2020-09-15 11:23:06
 * @LastEditors: hanfengmi
 * @Description: 通用模板
 */
import React, { PureComponent } from 'react'
import { connect } from 'dva'
import styles from './index.css'
import Header from '@/components/Header/index'
import Footer from '@/components/Footer/index'

@connect(({ user }) => ({
  user
}))

class Index extends PureComponent {
  componentDidMount() {
    const { dispatch } = this.props
    dispatch({
      type: 'user/GetInfo'
    })
  }

  render() {
    return (
      <div className={ styles.normal }>
        <Header />
        <div className={styles.Content}>
          { this.props.children }
        </div>
        <Footer />
      </div>
    )
  }
}

export default Index
